import { RequestType } from '~/config/enum/request-type.enum'
const CONTROLLER = 'task'
const SERVICE = 'service-manage'

export default {
  /**
   * 分页获取所有的定时任务
   */
  findTaskByPage: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'findTaskByPage',
    type: RequestType.Get
  },
  /**
   * 修改任务信息
   */
  updateJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'updateJob',
    type: RequestType.Post
  },
  /**
   * 暂停任务
   */
  pauseJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'pauseJob',
    type: RequestType.Post
  },
  /**
   * 恢复任务
   */
  resumeJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'resumeJob',
    type: RequestType.Post
  },
  /**
   * 删除任务
   */
  deleteJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'deleteJob',
    type: RequestType.Post
  },
  /**
   * 立即执行
   */
  runJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'runJob',
    type: RequestType.Post
  },
  /**
   * 获取任务触发器列表
   */
  getAllTriggerOfJob: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'getAllTriggerOfJob',
    type: RequestType.Get
  },
  /**
   * 添加触发器
  */
  addTrigger: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'addTrigger',
    type: RequestType.Post
  },
  /**
   * 删除触发器
   */
  deleteTrigger: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'deleteTrigger',
    type: RequestType.Post
  },  
  /**
   * 暂停触发器
   */
  pauseTrigger: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'pauseTrigger',
    type: RequestType.Post
  },  
  /**
   * 恢复触发器
   */
  resumeTrigger: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'resumeTrigger',
    type: RequestType.Post
  },  
}
